<template>

    <van-nav-bar title="详情" left-text="返回" left-arrow @click-left="onClickLeft" />
    <van-swipe :autoplay="3000" lazy-render>
        <van-swipe-item v-for="image in images" :key="image">
            <img :src="image" style="width: 100%; height: 200px;" />
        </van-swipe-item>
    </van-swipe>

    <div v-html="detailApiData.goods_introduce">

    </div>
</template>

<script setup>
import { useRoute } from "vue-router";
import { detailApi } from "@/api/api";
const detailApiData = ref([])
import { ref } from 'vue'
const router = useRoute()
detailApi(router.params.goods_id).then(res => {
    console.log('详情数据', res);
    detailApiData.value = res = res.data.message
})
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
];
</script>

<style lang="scss" scoped></style>